package com.lzw.mapper;

import com.lzw.bean.Menu;
import com.lzw.bean.Role;
import com.lzw.common.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * Created by 林志伟 on 2017/5/11.
 */

@Mapper
@Repository
public interface MenuMapper extends BaseMapper<Menu> {

    /**
     * 查询多级菜单
     * @return
     */
    public List<Menu> findMenu();

    /**
     * 查询子菜单
     * @param id
     * @return
     */
    public List<Menu> findMenuByPid(@Param("id") Integer id);

    public List<Menu> selectByRole(@Param("role_id") int role_id);

}
